﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class exame2_boomerArea : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void OnTriggerEnter(Collider other)
    {
        //print(1);
        if(other.tag.Equals("Enemy"))
        {
            //other.gameObject.SendMessageUpwards("enableBoom", true, SendMessageOptions.RequireReceiver);
            other.gameObject.GetComponent<exame2_boomer>().isBoom = true;
        }
    }

    private void OnTriggerExit(Collider other)
    {
        if (other.tag.Equals("Enemy"))
        {
            //other.gameObject.SendMessageUpwards("enableBoom", false, SendMessageOptions.RequireReceiver);
            other.gameObject.GetComponent<exame2_boomer>().isBoom = false;
        }
    }
}
